<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
</head>

<body>
    <script type="text/javascript">
        let sum = 0;
        let j = 1;

        for (let i = 1; i <= 100; i++) {
            // sum = sum + i;
            j = i * j

            sum = sum + j;
        }
        console.log(sum);
    </script>
</body>

</html>